/**
 * Created by Administrator on 2016/6/23.
 */
Array.prototype.uniquel = function(){
    var res = [this[0]];
    for(var i = 1; i < this.length; i++){
        var repeat = false;
        for(var j = 0; j < res.length; j++){
            if(this[i] == res[j]){
                repeat = true;
                break;
            }
        }
        if(!repeat){
            res.push(this[i]);
        }
    }
    return res;
}
var arr = [1,2,1,2,12,45,12,2,0,67,45,9,8];
alert(arr.uniquel());